import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'

Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    name:'home',
    component:Home,
    meta:{
      hideBtn:true
    }
  },
  {
    path:'/films',
    name:'films',
    component: () => import('../views/Films') // 路由懒加载
  },
  {
    path:'/detail/:filmId',
    name:'detail',
    component: () => import('../views/Detail'),
    meta:{
      bottomName:'BottomBar', // 元信息，表示底部要展示的组件名
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
